# Maintainer: Antonio Rojas <arojas@archlinux.org>

pkgname=mcqd
pkgver=1.0.0
pkgrel=3
pkgdesc='Maximum Clique Algorithm for finding a maximum clique in an undirected graph'
arch=(loong64 x86_64)
url='http://www.sicmm.org/~konc/maxclique/'
license=(GPL3)
depends=(gcc-libs)
source=(https://gitlab.com/janezkonc/mcqd/-/archive/v$pkgver/$pkgname-v$pkgver.tar.bz2
        mcqd-silent.patch)
sha256sums=('e694e62a320f9a0522a0d72b86ec17872f1306f5e989c4f0e93184e519139b93'
            '89b186a032d3b2e542c38ab601a9c5b8ed11f0385a3473fece3778409e9c7045')

prepare() {
  patch -d $pkgname-v$pkgver < mcqd-silent.patch # Silence debug output
}

build() {
  cd $pkgname-v$pkgver

  g++ ${CXXFLAGS} ${LDFLAGS} mcqd.cpp -o mcqd
}

package() {
  cd $pkgname-v$pkgver

  install -Dm755 mcqd "$pkgdir"/usr/bin/mcqd
  install -Dm644 mcqd.h "$pkgdir"/usr/include/mcqd.h
  install -D COPYING "$pkgdir"/usr/share/licenses/mcqd/COPYING
}
